XMLContentModel Class

Represents a parsed DTD element declaration. Expat defines this structure and XmlContentModel is a direct representation of it.

Events

None

Properties

Name

NumChildren

Quant

Type


Methods

Child


More information available in parent classes: Object

It is passed to the ElementDecl event of XMLReader. This will be useful to anyone building DTD validation routines.


Constants

Here are the constants that can be compared to the value of the Type property

ValueConstant
1 XML_CTYPE_EMPTY
2 XML_CTYPE_ANY
3 XML_CTYPE_MIXED
4 XML_CTYPE_NAME
5 XML_CTYPE_CHOICE
6 XML_CYTPE_SEQ

:

Here are the constants that can be compared to the value of the Quant property:

ValueConstant
0 XML_CQUANT_NONE
1 XML_CQUANT_OPT
2 XML_CQUANT_REP
3 XML_CQUANT_PLUS


Notes

If Type is XML_CTYPE_EMPTY or XML_CTYPE_ANY then quant will be XML_CQUANT_NONE and the other fields will be zero or NULL. If Type is XML_CTYPE_MIXED, then quant will be None or REP and numChildren will contain the number of elements that may be mixed in and children point to an array of XMLContent cells that will be all of XML_CTYPE_NAME type with no quantification.

If Type is XML_CTYPE_NAME, then the name points to the name and the numChildren field will be zero and children will be NULL. The quant fields indicate any quantifiers placed on the name.

CHOICE and SEQ will have name NULL, the number of children in numChildren and children will point, recursively, to an array of XMLContent cells.

The EMPTY, ANY, and MIXED types will occur only at the top level.


See Also

XMLReader class.